import request from '@/utils/request'

export function listDomain(pos, size, conditions) {
  return request({
    url: '/domain/list',
    params: {
      'jsonCondition': JSON.stringify(conditions),
      'pos': pos,
      'size': size
    },
    method: 'get'
  })
}

export function setDomain(domainmodel) {
  return request({
    url: '/domain/set',
    data: domainmodel,
    method: 'post'
  })
}

export function delDomain(domainmodel) {
  return request({
    url: '/domain/del',
    data: domainmodel,
    method: 'post'
  })
}
export function delDomains(jsonDomainModel) {
  return request({
    url: '/domain/bulkdel',
    data: {
      data: jsonDomainModel
    }, // contentType 要求接受JSON格式
    method: 'post'
  })
}
